package com.sky.mapper;

import com.sky.entity.DishFlavor;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 菜品口味关系表 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-06-25
 */
@Mapper
public interface DishFlavorMapper extends BaseMapper<DishFlavor> {
    void insertBatch(@Param("list") List<DishFlavor> flavors);

    @Delete("delete from dish_flavor where dish_id = #{dishId}")
    void deleteByDishId(Long dishId);

    void deleteByDishIds(@Param("list") List<Long> ids);
}
